package org.snackframework.core;

public class ViewMetaData
{
	private Object viewObject;
	
	private String viewClassName;
	
	private Class viewClass;
	
	private ViewType viewType;
	
	public Object getViewObject()
	{
		return viewObject;
	}

	public void setViewObject(Object viewObject)
	{
		this.viewObject = viewObject;
	}

	public String getViewClassName()
	{
		return viewClassName;
	}

	public void setViewClassName(String viewClassName)
	{
		this.viewClassName = viewClassName;
	}

	public Class getViewClass()
	{
		return viewClass;
	}

	public void setViewClass(Class viewClass)
	{
		this.viewClass = viewClass;
	}

	public ViewType getViewType()
	{
		return viewType;
	}

	public void setViewType(ViewType viewType)
	{
		this.viewType = viewType;
	}

	public void initializeViewObject() throws InstantiationException,IllegalAccessException
	{
		this.viewObject=this.viewClass.newInstance();
	}
	
	public Object prototypeInstance() throws InstantiationException,IllegalAccessException
	{
		return this.viewClass.newInstance();
	}
}
